package com.dycong.common.IO.socket.NIO;

/**
 * Created by dycong on 2017/3/25.
 */
public class Test {
    public static void main(String[] args) throws Exception{
        new Thread(new Runnable() {
            @Override
            public void run() {
                NIOServer server=new NIOServer();
                server.start();
            }
        }).start();
        new Thread(new Runnable() {
            @Override
            public void run() {
                NIOServer server=new NIOServer();
                server.start();
            }
        }).start();
        Thread.sleep(2000);
        for (int i=0;i<20;i++){
            new Thread(new Runnable() {
                @Override
                public void run() {
                    NIOClient client=new NIOClient();
                    client.start();
                }
            }).start();
        }

        Thread.sleep(10000);
        for (int i=0;i<20;i++){
            new Thread(new Runnable() {
                @Override
                public void run() {
                    NIOClient client=new NIOClient();
                    client.start();
                }
            }).start();
        }


    }
}
